package com.artezio.buyndrive.domain;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.validation.constraints.NotNull;

@Embeddable
//Составной ключ(автосервис, запчасть)
public class CarservicePartsPK implements Serializable {
    
    @Basic(optional = false)
    @NotNull
    @Column(name = "id_carservice")
    private Long idCarservice;
    
    @Basic(optional = false)
    @NotNull
    @Column(name = "id_parts")
    private Long idParts;

    public CarservicePartsPK() {
    }

    public CarservicePartsPK(Long idCarservice, Long idParts) {
        this.idCarservice = idCarservice;
        this.idParts = idParts;
    }

    public Long getIdCarservice() {
        return idCarservice;
    }

    public void setIdCarservice(Long idCarservice) {
        this.idCarservice = idCarservice;
    }

    public Long getIdParts() {
        return idParts;
    }

    public void setIdParts(Long idParts) {
        this.idParts = idParts;
    }
}
